package com.alibaba.ecool.dao.impl;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.alibaba.ecool.bean.Cloze;
import com.alibaba.ecool.bean.ClozeContent;
import com.alibaba.ecool.bean.Question;
import com.alibaba.ecool.dao.ClozeContentDAO;


public class ClozeContentDAOImpl extends SqlMapClientDaoSupport implements ClozeContentDAO{

	@Override
	public int getAnswerNum() {
		return 0;
		
	}

	@Override
	public int getCorrectNum() {
		//return  (int) getSqlMapClientTemplate().queryForObject("getCorrectNum") ;
		return 0;
	}

	@Override
	public void updateAnswerNum( int AnswerNum) {
		getSqlMapClientTemplate().update("updateAnswerNum",AnswerNum);
		
	}

	@Override
	public void updateCorrectNum(int CorrectNum) {
		getSqlMapClientTemplate().update("updateCorrectNum",CorrectNum);
		
	}

	@Override
	public void updateDifficult(int difficult) {
		getSqlMapClientTemplate().update("updateDifficult", difficult);
		
	}

	@Override
	public List getClozeContent() {
		// TODO Auto-generated method stub
		return getSqlMapClientTemplate().queryForList("getClozeContent",null);
	}

	@Override
	public List getClozeContentByRow(Question qes) {
		return getSqlMapClientTemplate().queryForList("getClozeContentByRow", qes);
	}

	@Override
	public int getCountByDifficult(Question qes) {
		return (Integer)getSqlMapClientTemplate().queryForObject("getCountByDifficultC", qes);
	}

	@Override
	public void insertClozeContent(ClozeContent clozecontent) {
		this.getSqlMapClientTemplate().insert("insertClozeContent", clozecontent);
		
	}

	@Override
	public void updateContent(int ID, String content) {
		// TODO Auto-generated method stub
		
	}


  
}
